package com.yjt.gcss.gddw.common.bean.domain;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;

import com.yjt.common.tools.TimeUtil;


/**
 * UiFileLog entity. @author MyEclipse Persistence Tools
 */
public class UiFileLog extends AbstractUiFileLog implements
		java.io.Serializable {

	public static final String BEAN_PACKAGE_NAME = "com.yjt.gcss.gddw.common.bean.domain.UiFileLog";
	/**请求：批量代收信息标识**/
	public static final int FILE_HEAD_PLDSXXBS_LENGTH = 27;
	/**请求：银行代码**/
	public static final int FILE_HEAD_YHDM_LENGTH = 4;
	/**请求：单位编码**/
	public static final int FILE_HEAD_DWBM_LENGTH = 8;
	/**请求：送银行日期**/
	public static final int FILE_HEAD_SYHRQ_LENGTH = 8;
	/**请求：货币符号**/
	public static final int FILE_HEAD_HBFH_LENGTH = 5;
	/**请求：收费方式**/
	public static final int FILE_HEAD_SFFS_LENGTH = 3;
	/**请求：费用类型**/
	public static final int FILE_HEAD_FYLX_LENGTH = 3;
	/**请求：总笔数**/
	public static final int FILE_HEAD_ZBS_LENGTH = 11;
	/**请求：总金额**/
	public static final int FILE_HEAD_ZJE_LENGTH = 16;
	/**请求：对公标识  created by lizb(2014-10-29)**/
	public static final int FILE_HEAD_DGBZ_LENGTH = 2;
	/**请求：说明**/
	public static final int FILE_HEAD_SM_LENGTH = 128;
	/**回应：成功笔数**/
	public static final int FILE_HEAD_SUCCNT = 11;
	/**回应：成功金额**/
	public static final int FILE_HEAD_SUCAMT = 16;
	/**回应：失败笔数**/
	public static final int FILE_HEAD_FAILCNT = 11;
	/**回应：失败金额**/
	public static final int FILE_HEAD_FAILAMT = 16;
	/**回应：收费员**/
	public static final int FILE_HEAD_SFY = 20;
	/**
	 * R(remote):文件在远程SFTP目录。 
	 * */
	public static final String FILE_STATUS_R = "R";
	/**
	 * A(await):文件已下载成功，待验证，并解析。 
	 * */
	public static final String FILE_STATUS_A = "A";
	/**
	 * L(local) :成功下载文件到本地目录。
	 * */
	public static final String FILE_STATUS_L = "L";
	/**
	 * S(success):解析文件成功。 
	 * */
	public static final String FILE_STATUS_S = "S";
	/**
	 * U(upload):回应文件已成功回复。
	 * */
	public static final String FILE_STATUS_U = "U";
	/**
	 * F(failure):处理文件失败，这里的“处理文件”操作包括：验证文件、解析文件、生成文件、上传文件。这种失败只能让供电方重新发起交易。
	 * */
	public static final String FILE_STATUS_F = "F";
	/**
	 * E(end):机构记账回应接收成功，记账流程完成。
	 * */
	public static final String FILE_STATUS_E = "E";
	
	public static final Map<String, String> FILE_STATUS_REMARK_MAP;
	
	static {
		FILE_STATUS_REMARK_MAP = new HashMap<String, String>();
		FILE_STATUS_REMARK_MAP.put(FILE_STATUS_A, "文件验证成功，待解析。");
		FILE_STATUS_REMARK_MAP.put(FILE_STATUS_R, "文件在远程SFTP目录。");
		FILE_STATUS_REMARK_MAP.put(FILE_STATUS_L, "成功下载文件到本地目录。");
		FILE_STATUS_REMARK_MAP.put(FILE_STATUS_S, "解析文件成功。 ");
		FILE_STATUS_REMARK_MAP.put(FILE_STATUS_U, "回应文件已成功回复。");
		FILE_STATUS_REMARK_MAP.put(FILE_STATUS_F, "处理文件失败（验证文件、解析文件、生成文件、上传文件）。");
		FILE_STATUS_REMARK_MAP.put(FILE_STATUS_E, "记账回应处理完成，记账结束。");
	}
	// Constructors

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/** default constructor */
	public UiFileLog() {
	}

	/** minimal constructor */
	public UiFileLog(String reqHeadJybsh,String reqHeadYwbsh,String reqHeadJyjsf, String reqHeadJyfqf, String reqJylsh, String reqJyrq, String reqJysj,
			String reqDwbm, String reqSffs, String reqFylx, String reqKhbz,
			String reqWjmc, String reqWjlx, String reqWjmd5, String reqZbs,
			String reqZje, String sucCnt, String sucAmt, String failCnt, String failAmt, String fileStatus,
			String status, String createDate, String createTime) {
		super(reqHeadJybsh, reqHeadYwbsh, reqHeadJyjsf, reqHeadJyfqf, reqJylsh, reqJyrq, reqJysj, 
				reqDwbm, reqSffs, reqFylx, reqKhbz, 
				reqWjmc, reqWjlx, reqWjmd5, reqZbs, 
				reqZje, sucCnt, sucAmt, failCnt, failAmt, fileStatus, 
				status, createDate, createTime);
	}

	/** full constructor */
	public UiFileLog(String reqHeadJybsh,String reqHeadYwbsh,String reqHeadJyjsf, String reqHeadJyfqf, String reqJylsh, String reqJyrq, String reqJysj,
			String reqDwbm, String reqSffs, String reqFylx, String reqKhbz,
			String reqWjmc, String reqWjlx, String reqWjmd5, String reqZbs,
			String reqZje, String fileHeadPldsxxbs, String fileHeadYhdm,
			String fileHeadDwbm, String fileHeadSyhrq, String fileHeadHbfh,
			String fileHeadSffs, String fileHeadFylx, String fileHeadZbs, String fileHeadZje,String fileHeadDgbz,
			String fileHeadSm, String rspJylsh, String rspJyrq, String rspJysj,
			String rspWjlx, String rspWjmd5, String sucCnt,
			String sucAmt, String failCnt, String failAmt, String fileStatus, String fileStatusRemark, String status,
			String createDate, String createTime, String remark, String replyFileName, String retCd, String retCdRemark) {
		super(reqHeadJybsh, reqHeadYwbsh, reqHeadJyjsf, reqHeadJyfqf, reqJylsh, reqJyrq, reqJysj, 
				reqDwbm, reqSffs, reqFylx, reqKhbz,reqWjmc, reqWjlx, reqWjmd5, reqZbs, 
				reqZje, fileHeadPldsxxbs, fileHeadYhdm, 
				fileHeadDwbm, fileHeadSyhrq, fileHeadHbfh, 
				fileHeadSffs, fileHeadFylx, fileHeadZbs, fileHeadZje,fileHeadDgbz, 
				fileHeadSm, rspJylsh, rspJyrq, rspJysj, 
				rspWjlx, rspWjmd5, sucCnt, 
				sucAmt, failCnt, failAmt, fileStatus, fileStatusRemark, status, 
				createDate, createTime, remark, replyFileName, retCd, retCdRemark);
	}

	private String createDateTimeDesc;
	public String getCreateDateTimeDesc() {
		return TimeUtil.changeStrTimeFormat(this.getCreateDate() + this.getCreateTime(), "yyyyMMddHHmmss", "yyyy-MM-dd HH:mm:ss");
	}
	private String query_start_date_jyrq;
	private String query_end_date_jyrq;
	public String getQuery_start_date_jyrq() {
		return query_start_date_jyrq;
	}
	
	public void setQuery_start_date_jyrq(String query_start_date_jyrq) {
		this.query_start_date_jyrq = query_start_date_jyrq;
	}
	
	public String getQuery_end_date_jyrq() {
		return query_end_date_jyrq;
	}
	
	public void setQuery_end_date_jyrq(String query_end_date_jyrq) {
		this.query_end_date_jyrq = query_end_date_jyrq;
	}
	private String fileStatusRemarkDesc;
	public String getFileStatusRemarkDesc() {
		if(StringUtils.isBlank(this.getFileStatusRemark())) {
			return FILE_STATUS_REMARK_MAP.get(this.getFileStatus());
		}
		return this.getFileStatusRemark();
	}
}
